<template>
  <div id="eventResponse" >
    <!--右上角按钮-->
    <div style='position:absolute;right:2%;top:10%;z-index: 99'>
      <div class='top_button_box'>
        <i style="margin-left:5px;color: white;font-size: 30px;opacity: 0.5;z-index: 98" @click="fullScreen" class="el-icon-full-screen"></i>
      </div>
    </div>


    <div id="entirety" style="background-image: url('/static/background/background.png');height:90vh">
    <div style='display: flex;display: -webkit-flex;justify-content: center'>
      <div class="title_class" style='margin-top: 2vh;font-size: 15pt'>异常报告</div>
    </div>
      <div style="height: 40vh" class='table_box'>
        <el-table
          :data="abnormalInfoList"
          height="35vh"
          :header-row-style="{height: '5vh'}"
          border
          style="width:100%">
          <el-table-column type="index" label="序号"  width='80' ></el-table-column>
          <el-table-column prop="hostId" label="主机ID"  :show-overflow-tooltip="true" ></el-table-column>
          <el-table-column prop="supplierName" label="所属云商"  :show-overflow-tooltip="true" ></el-table-column>
          <el-table-column prop="abnormalTime" label="异常时间"  :show-overflow-tooltip="true" ></el-table-column>
          <el-table-column label="异常类型">
            <template slot-scope="scope">
              <span>{{getTypeText(scope.row.abnormalType).label}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="responseTime" label="响应时间"  :show-overflow-tooltip="true" ></el-table-column>
          <el-table-column prop="recoverTime" label="恢复时间"  :show-overflow-tooltip="true" ></el-table-column>
        </el-table>
      </div>

      <div class='cardDiv'>
        <el-row :gutter='30'>
          <el-col :span=8>
            <el-card class='chart_card'>
              <div style='display: flex;display: -webkit-flex;justify-content: center'>
                <div class="title_class" style='margin-top: 10px'>云商异常事件比例</div>
              </div>
              <div style='display: flex;display: -webkit-flex;justify-content: center;align-items: center'>
                <div id='pieChart' style="height: 33vh;width:100%;margin-top: 1vh"> </div>
              </div>
            </el-card>
          </el-col>
          <el-col :span=8>
            <el-card class='chart_card'>
              <div style='display: flex;display: -webkit-flex;justify-content: center'>
                <div class="title_class" style='margin-top: 10px'>平均响应时间/秒</div>
              </div>
              <div id='responseTimeChart' style="height: 33vh"> </div>
            </el-card>
          </el-col>
          <el-col :span=8>
            <el-card class='chart_card'>
              <div style='display: flex;display: -webkit-flex;justify-content: center'>
                <div class="title_class" style='margin-top: 10px'>平均恢复时间/秒</div>
              </div>
              <div id='recoverTimeChart' style="height: 33vh"> </div>

            </el-card>
          </el-col>
        </el-row>

      </div>

    </div>

  </div>
</template>

<script src='./js/index.js'>
</script>
<style lang="scss">
@font-face {
  font-family: 'Alternate';
  //src: url('../../assets/iconfont/Alternate.ttf');
  font-style: normal;
  font-width: normal;
}

@import './css/eventResponse.scss';
</style>
